﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;

namespace A_Modules.ImageTransparent
{
    class ImageTransparent
    {
        private string srcfile =
            @"D:\DevProjects\Myprojects\DotNet\iceternally-dotnet-test\trunk\BaseLab\BaseLab20\A-Modules\ImageTransparent\Src\Src1.tif";
            //@"D:\DevProjects\Myprojects\DotNet\iceternally-dotnet-test\trunk\BaseLab\BaseLab20\A-Modules\ImageWaterMark\SRC\Square_1.bmp";
            //@"D:\DevProjects\Myprojects\DotNet\iceternally-dotnet-test\trunk\BaseLab\BaseLab20\ECC_EXT_ImageUtility\ImageLib\BaseSrc\Ellipse.bmp"; 
        private string desfile =
            @"D:\DevProjects\Myprojects\DotNet\iceternally-dotnet-test\trunk\BaseLab\BaseLab20\A-Modules\ImageTransparent\Src\Src2.tif";
            //@"D:\DevProjects\Myprojects\DotNet\iceternally-dotnet-test\trunk\BaseLab\BaseLab20\A-Modules\ImageTransparent\Src\Square_1.ico";
            //@"D:\DevProjects\Myprojects\DotNet\iceternally-dotnet-test\trunk\BaseLab\BaseLab20\ECC_EXT_ImageUtility\ImageLib\BaseSrc\Ellipse.ico"; 



        public void Test()
        {


            var _bitmap = new Bitmap(srcfile);


            Color _color = Color.White;//_bitmap.GetPixel(1, 1);
            _bitmap.MakeTransparent(_color);

            _bitmap.Save(desfile);
        }

    }
}
